package com.bajiao.service.config;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ijpay.alipay.AliPayApiConfig;
import com.ijpay.wxpay.WxPayApiConfig;
import com.bajiao.entity.config.Config;
import com.bajiao.vo.config.ConfigVO;

import java.util.List;
import java.util.Map;

/**
 * @Description: 系统配置
 * @Author: FanJq
 * @Date: 2024-10-1006-02
 * @Version: V1.0
 */
public interface ConfigService extends IService<Config> {

    List<Config> queryConfigByConfigName(String configName);

    /**
     * 通过组名和名称获取数据
     *
     * @param configGroup
     * @param configName
     * @return
     */
    String getValue(String configGroup, String configName);

    String queryTitleByGroupAndValue(String configGroup, String configValue);

    String queryValueByGroup(String configGroup);

    Map queryNameAndValueByGroup(String configGroup);

    /**
     * 修改指定系统配置
     *
     * @param configName
     * @return
     */
    void updateByConfigGroupAndConfigName(String configGroup, String configName, String value, String title);


    /**
     * 获取支付宝支付配置bean
     *
     * @return
     */
    AliPayApiConfig getAliPayApiConfig();

    /**
     * @Description
     * 获取微信支付配置bean
     * @date 2024/12/19 9:48
     * @author FanJq
     * @param configGroup
     * @return {@link WxPayApiConfig}
    */
    WxPayApiConfig getWxPayApiConfig(String configGroup);

    List<ConfigVO> queryConfigList(String configGroup);

    ConfigVO queryConfig(String configGroup, String configName);

    String queryByConfigName(String configName);

    Map<String, String> getWxMiniConfig();

    /**
     * @Description
     * 获取回调路径
     * @date 2024/12/25 11:08
     * @author FanJq
     * @param name
     * @return {@link String}
    */
    String getCallback(String name);
}
